package com.itheima.homew;

class Studentmsg {
    private  String name;
    private int age;

    public Studentmsg() {
    }

    public Studentmsg(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
    public void show (){
        System.out.println("姓名"+name+"..."+"年龄"+age);
    }
}
public class Student {
    public static void main(String[] args) {
        Studentmsg s1 = new Studentmsg("张三",28);
        Studentmsg s2 = new Studentmsg();
        s2.setAge(23);
        s2.setName("刘备");
        s1.show();
        s2.show();
    }
}
